﻿<%@ Page Title="التقرير الاجمالى للنظام" Language="C#" MasterPageFile="~/MasterPages/Report.Master"
    AutoEventWireup="true" CodeBehind="TotalSystemReport.aspx.cs" Inherits="Pap.Web.Modules.Reports.Views.TotalSystemReport" %>

<%@ MasterType VirtualPath="~/MasterPages/Report.Master" %>
<asp:Content ID="Content3" ContentPlaceHolderID="ReportParamsPlaceHolder" runat="server">
    <ext:Store runat="server" ID="strReport">
        <Reader>
            <ext:JsonReader>
                <Fields>
                    <ext:RecordField Name="LoanNumber" />
                    <ext:RecordField Name="CustomerName" />
                    <ext:RecordField Name="SSN" />
                    <ext:RecordField Name="LoanName" />
                    <ext:RecordField Name="LoanAmount" />
                    <ext:RecordField Name="LoanPaymentPeriod" />
                    <ext:RecordField Name="LoanPaidAmount" />
                    <ext:RecordField Name="DueAmount" />
                    <ext:RecordField Name="LoanPaymentMethodName" />
                </Fields>
            </ext:JsonReader>
        </Reader>
    </ext:Store>
    <ext:Store ID="strEducationalLevels" runat="server">
        <Reader>
            <ext:JsonReader ReaderID="ID">
                <Fields>
                    <ext:RecordField Name="ID" Mapping="ID" />
                    <ext:RecordField Name="Name" Mapping="Name" />
                </Fields>
            </ext:JsonReader>
        </Reader>
    </ext:Store>
    <ext:Store ID="strProjects" runat="server">
        <Reader>
            <ext:JsonReader ReaderID="ProjectID">
                <Fields>
                    <ext:RecordField Name="ProjectID" Mapping="ProjectID" />
                    <ext:RecordField Name="ProjectName" Mapping="ProjectName" />
                </Fields>
            </ext:JsonReader>
        </Reader>
    </ext:Store>
    <ext:Store ID="strProjectStages" runat="server">
        <Reader>
            <ext:JsonReader ReaderID="ProjectStageID">
                <Fields>
                    <ext:RecordField Name="ProjectStageID" Mapping="ProjectStageID" />
                    <ext:RecordField Name="Stage" Mapping="Stage" />
                </Fields>
            </ext:JsonReader>
        </Reader>
    </ext:Store>
    <ext:Store ID="strSocialStatus" runat="server">
        <Reader>
            <ext:JsonReader ReaderID="ID">
                <Fields>
                    <ext:RecordField Name="ID" Mapping="ID" />
                    <ext:RecordField Name="Name" Mapping="Name" />
                </Fields>
            </ext:JsonReader>
        </Reader>
    </ext:Store>
    <ext:Store ID="strLoanTypes" runat="server">
        <Reader>
            <ext:JsonReader ReaderID="ID">
                <Fields>
                    <ext:RecordField Name="ID" Mapping="ID" />
                    <ext:RecordField Name="Name" Mapping="Name" />
                </Fields>
            </ext:JsonReader>
        </Reader>
    </ext:Store>
    <ext:Store ID="strLegalForms" runat="server">
        <Reader>
            <ext:JsonReader ReaderID="ID">
                <Fields>
                    <ext:RecordField Name="ID" Mapping="ID" />
                    <ext:RecordField Name="Name" Mapping="Name" />
                </Fields>
            </ext:JsonReader>
        </Reader>
    </ext:Store>
    <ext:Store ID="strLoanPlaceTypes" runat="server">
        <Reader>
            <ext:JsonReader ReaderID="ID">
                <Fields>
                    <ext:RecordField Name="ID" Mapping="ID" />
                    <ext:RecordField Name="Name" Mapping="Name" />
                </Fields>
            </ext:JsonReader>
        </Reader>
    </ext:Store>
    <ext:Store ID="strLoanSteps" runat="server">
        <Reader>
            <ext:JsonReader ReaderID="StepID">
                <Fields>
                    <ext:RecordField Name="StepID" Mapping="StepID" />
                    <ext:RecordField Name="DisplayName" Mapping="DisplayName" />
                </Fields>
            </ext:JsonReader>
        </Reader>
    </ext:Store>
    <ext:Store ID="strCommittee" runat="server">
        <Reader>
            <ext:JsonReader ReaderID="CommitteeID">
                <Fields>
                    <ext:RecordField Name="CommitteeID" Mapping="CommitteeID" />
                    <ext:RecordField Name="CommitteeName" Mapping="CommitteeName" />
                </Fields>
            </ext:JsonReader>
        </Reader>
    </ext:Store>
    <ext:Store ID="strResponsibles" runat="server">
        <Reader>
            <ext:JsonReader ReaderID="UserID">
                <Fields>
                    <ext:RecordField Name="UserID" Mapping="UserID" />
                    <ext:RecordField Name="DisplayName" Mapping="DisplayName" />
                </Fields>
            </ext:JsonReader>
        </Reader>
    </ext:Store>
    <ext:FormLayout ID="FormLayout1" runat="server">
        <ext:Anchor Horizontal="95%">
            <ext:FormPanel ID="FormPanel12" runat="server">
                <Body>
                    <table>
                        <tr>
                            <td>
                                <ext:Label runat="server" ID="lblCustomerType" Text="نوع العميل">
                                </ext:Label>
                            </td>
                            <td>
                                <ext:ComboBox runat="server" ID="cmbCustomerType" TypeAhead="true" Editable="true"
                                    FieldLabel="نوع العميل" AllowBlank="true">
                                </ext:ComboBox>
                            </td>
                            <td>
                                <ext:Label runat="server" ID="lblEducationalLevel" Text="الحالة التعليمية">
                                </ext:Label>
                            </td>
                            <td>
                                <ext:ComboBox runat="server" AllowBlank="true" ID="cmbEducationalLevel" StoreID="strEducationalLevels"
                                    DisplayField="Name" ValueField="ID" TypeAhead="true" Editable="true" FieldLabel="الحالة التعليمية">
                                </ext:ComboBox>
                            </td>
                        </tr>
                    </table>
                </Body>
            </ext:FormPanel>
        </ext:Anchor>
        <ext:Anchor Horizontal="95%" Vertical="9%">
            <ext:FormPanel ID="FormPanel14" runat="server">
                <Body>
                    <table>
                        <tr>
                            <td>
                                <ext:Label runat="server" ID="lblProjects" Text="المشاريع">
                                </ext:Label>
                            </td>
                            <td>
                                <ext:MultiSelect runat="server" StoreID="strProjects" ID="lstProjects" DisplayField="ProjectName"
                                    ValueField="ProjectID" TypeAhead="true" Editable="true" FieldLabel="المشاريع"
                                    AllowBlank="true" Width="180px" Height="40px">
                                </ext:MultiSelect>
                            </td>
                            <td>
                                <ext:Label runat="server" ID="lblCommittees" Text="الجمعية">
                                </ext:Label>
                            </td>
                            <td>
                                <ext:MultiSelect runat="server" StoreID="strCommittee" ID="lstCommittees" DisplayField="CommitteeName"
                                    ValueField="CommitteeID" TypeAhead="true" Editable="true" FieldLabel="الجمعية"
                                    AllowBlank="true" Width="180px" Height="40px">
                                </ext:MultiSelect>
                            </td>
                        </tr>
                    </table>
                </Body>
            </ext:FormPanel>
        </ext:Anchor>
        <ext:Anchor Horizontal="95%">
            <ext:FormPanel ID="FormPanel11" runat="server">
                <Body>
                    <table>
                        <tr>
                            <td>
                                <ext:Label runat="server" ID="lblProjectStages" Text="مرحلة القرض">
                                </ext:Label>
                            </td>
                            <td>
                                <ext:ComboBox runat="server" AllowBlank="true" ID="cmbProjectStages" StoreID="strProjectStages"
                                    DisplayField="Stage" ValueField="ProjectStageID" TypeAhead="true" Editable="true"
                                    FieldLabel="مرحلة القرض">
                                </ext:ComboBox>
                            </td>
                            <td>
                                <ext:Label runat="server" ID="lblMilitaryStatus" Text="الحالة الاجتماعية">
                                </ext:Label>
                            </td>
                            <td>
                                <ext:ComboBox runat="server" StoreID="strSocialStatus" ID="cmbSocialStatus" DisplayField="Name"
                                    ValueField="ID" TypeAhead="true" Editable="true" FieldLabel="الحالة الاجتماعية"
                                    AllowBlank="true">
                                </ext:ComboBox>
                            </td>
                        </tr>
                    </table>
                </Body>
            </ext:FormPanel>
        </ext:Anchor>
        <ext:Anchor Horizontal="95%">
            <ext:FormPanel ID="FormPanel3" runat="server">
                <Body>
                    <table>
                        <tr>
                            <td>
                                <ext:Label runat="server" ID="lblAgeFrom" Text="السن من">
                                </ext:Label>
                            </td>
                            <td>
                                <ext:TextField runat="server" ID="txtAgeFrom" AllowBlank="true" FieldLabel="السن من"
                                    Regex="^[0-9]+$" Width="50px" />
                            </td>
                            <td>
                                <ext:Label runat="server" ID="lblAgeTo" Text="إلى">
                                </ext:Label>
                            </td>
                            <td>
                                <ext:TextField runat="server" ID="txtAgeTo" AllowBlank="true" FieldLabel="إلى" Regex="^[0-9]+$"
                                    Width="50px" />
                            </td>
                            <td>
                                <ext:Label runat="server" ID="lblJob" Text="المهنة">
                                </ext:Label>
                            </td>
                            <td>
                                <ext:TextField runat="server" ID="txtJob" AllowBlank="true" FieldLabel="المهنة" />
                            </td>
                        </tr>
                    </table>
                </Body>
            </ext:FormPanel>
        </ext:Anchor>
        <ext:Anchor Horizontal="95%">
            <ext:FormPanel ID="FormPanel1" runat="server">
                <Body>
                    <table>
                        <tr>
                            <td>
                                <ext:Label runat="server" ID="lblFamilyMembersFrom" Text="عدد افراد الاسرة من">
                                </ext:Label>
                            </td>
                            <td>
                                <ext:TextField runat="server" ID="txtFamilyMembersFrom" AllowBlank="true" FieldLabel="عدد افراد الاسرة من"
                                    Regex="^[0-9]+$" />
                            </td>
                            <td>
                                <ext:Label runat="server" ID="lblFamilyMembersTo" Text="إلى">
                                </ext:Label>
                            </td>
                            <td>
                                <ext:TextField runat="server" ID="txtFamilyMembersTo" AllowBlank="true" FieldLabel="إلى"
                                    Regex="^[0-9]+$" />
                            </td>
                        </tr>
                    </table>
                </Body>
            </ext:FormPanel>
        </ext:Anchor>
        <ext:Anchor Horizontal="95%">
            <ext:FormPanel ID="FormPanel2" runat="server">
                <Body>
                    <table>
                        <tr>
                            <td>
                                <ext:Label runat="server" ID="lblFamilyMonthlyIncomeRangeFrom" Text="متوسط الدخل الشهرى من">
                                </ext:Label>
                            </td>
                            <td>
                                <ext:TextField runat="server" ID="txtFamilyMonthlyIncomeRangeFrom" AllowBlank="true"
                                    Regex="^[0-9]+$" FieldLabel="متوسط الدخل الشهرى من" />
                            </td>
                            <td>
                                <ext:Label runat="server" ID="lblFamilyMonthlyIncomeRangeTo" Text="إلى">
                                </ext:Label>
                            </td>
                            <td>
                                <ext:TextField runat="server" ID="txtFamilyMonthlyIncomeRangeTo" AllowBlank="true"
                                    FieldLabel="إلى" Regex="^[0-9]+$" />
                            </td>
                        </tr>
                    </table>
                </Body>
            </ext:FormPanel>
        </ext:Anchor>
        <ext:Anchor Horizontal="95%">
            <ext:FormPanel ID="FormPanel9" runat="server">
                <Body>
                    <table>
                        <tr>
                            <td>
                                <ext:Label runat="server" ID="lblLoanTypes" Text="نوع المشروع">
                                </ext:Label>
                            </td>
                            <td>
                                <ext:ComboBox runat="server" AllowBlank="true" ID="cmbLoanTypes" StoreID="strLoanTypes"
                                    DisplayField="Name" ValueField="ID" TypeAhead="true" Editable="true" FieldLabel="نوع المشروع">
                                </ext:ComboBox>
                            </td>
                            <td>
                                <ext:Label runat="server" ID="lblLoanStatus" Text="حالة المشروع">
                                </ext:Label>
                            </td>
                            <td>
                                <ext:ComboBox runat="server" AllowBlank="true" ID="cmbLoanStatus" TypeAhead="true"
                                    Editable="true" FieldLabel="حالة المشروع">
                                </ext:ComboBox>
                            </td>
                        </tr>
                    </table>
                </Body>
            </ext:FormPanel>
        </ext:Anchor>
        <ext:Anchor Horizontal="95%">
            <ext:FormPanel ID="FormPanel10" runat="server">
                <Body>
                    <table>
                        <tr>
                            <td>
                                <ext:Label runat="server" ID="lblLegalForms" Text="تصنيف  المشروع">
                                </ext:Label>
                            </td>
                            <td>
                                <ext:ComboBox runat="server" AllowBlank="true" ID="cmbLegalForms" StoreID="strLegalForms"
                                    DisplayField="Name" ValueField="ID" TypeAhead="true" Editable="true" FieldLabel="تصنيف  المشروع">
                                </ext:ComboBox>
                            </td>
                            <td>
                                <ext:Label runat="server" ID="lblLoanPlaceTypes" Text="مكان المشروع">
                                </ext:Label>
                            </td>
                            <td>
                                <ext:ComboBox runat="server" AllowBlank="true" ID="cmbLoanPlaceTypes" StoreID="strLoanPlaceTypes"
                                    DisplayField="Name" ValueField="ID" TypeAhead="true" Editable="true" FieldLabel="مكان المشروع">
                                </ext:ComboBox>
                            </td>
                        </tr>
                    </table>
                </Body>
            </ext:FormPanel>
        </ext:Anchor>
        <ext:Anchor Horizontal="95%">
            <ext:ComboBox runat="server" AllowBlank="true" ID="cmbLoanSteps" StoreID="strLoanSteps"
                DisplayField="DisplayName" ValueField="StepID" TypeAhead="true" Editable="true"
                FieldLabel="حالة القرض">
            </ext:ComboBox>
        </ext:Anchor>
        <ext:Anchor Horizontal="95%">
            <ext:FormPanel ID="FormPanel13" runat="server">
                <Body>
                    <table>
                        <tr>
                            <td>
                                <ext:Label runat="server" ID="lblPaymentPeriod" Text="مدة سداد القرض">
                                </ext:Label>
                            </td>
                            <td>
                                <ext:TextField runat="server" ID="txtPaymentPeriod" AllowBlank="true" FieldLabel="مدة سداد القرض"
                                    Regex="^[0-9]+$" />
                            </td>
                            <td>
                                <ext:Label runat="server" ID="lblLoanExecutionAmount" Text="مبلغ التنفيذ">
                                </ext:Label>
                            </td>
                            <td>
                                <ext:TextField runat="server" ID="txtLoanExecutionAmount" AllowBlank="true" FieldLabel="مبلغ التنفيذ"
                                    Regex="^[0-9]+$" />
                            </td>
                        </tr>
                    </table>
                </Body>
            </ext:FormPanel>
        </ext:Anchor>
        <ext:Anchor Horizontal="95%">
            <ext:Panel ID="FormPanel4" runat="server">
                <Body>
                    <table>
                        <tr>
                            <td>
                                <ext:Label runat="server" ID="lblLoanExecutionDateFrom" Text="تاريخ التنفيذ من ">
                                </ext:Label>
                            </td>
                            <td>
                                <ext:DateField runat="server" ID="dtLoanExecutionDateFrom" AllowBlank="true" FieldLabel="تاريخ التنفيذ من " />
                            </td>
                            <td>
                                <ext:Label runat="server" ID="lblLoanExecutionDateTo" Text="إلى">
                                </ext:Label>
                            </td>
                            <td>
                                <ext:DateField runat="server" ID="dtLoanExecutionDateTo" AllowBlank="true" FieldLabel="الى" />
                            </td>
                        </tr>
                    </table>
                </Body>
            </ext:Panel>
        </ext:Anchor>
        <ext:Anchor Horizontal="95%">
            <ext:FormPanel ID="FormPanel5" runat="server">
                <Body>
                    <table>
                        <tr>
                            <td>
                                <ext:Label runat="server" ID="lblLoanLastInstallmentDateFrom" Text="تاريخ انهاء السداد من ">
                                </ext:Label>
                            </td>
                            <td>
                                <ext:DateField runat="server" ID="dtLoanLastInstallmentDateFrom" AllowBlank="true"
                                    FieldLabel="تاريخ انهاء السداد من " />
                            </td>
                            <td>
                                <ext:Label runat="server" ID="lblLoanLastInstallmentDateTo" Text="إلى">
                                </ext:Label>
                            </td>
                            <td>
                                <ext:DateField runat="server" ID="dtLoanLastInstallmentDateTo" AllowBlank="true"
                                    FieldLabel="الى" />
                            </td>
                        </tr>
                    </table>
                </Body>
            </ext:FormPanel>
        </ext:Anchor>
        <ext:Anchor Horizontal="95%">
            <ext:FormPanel ID="FormPanel6" runat="server">
                <Body>
                    <table>
                        <tr>
                            <td>
                                <ext:Label runat="server" ID="lblLoanCreateDateFrom" Text="تاريخ الطلب من">
                                </ext:Label>
                            </td>
                            <td>
                                <ext:DateField runat="server" ID="dtLoanCreateDateFrom" AllowBlank="true" FieldLabel="تاريخ الطلب من" />
                            </td>
                            <td>
                                <ext:Label runat="server" ID="lblLoanCreateDateTo" Text="إلى">
                                </ext:Label>
                            </td>
                            <td>
                                <ext:DateField runat="server" ID="dtLoanCreateDateTo" AllowBlank="true" FieldLabel="الى" />
                            </td>
                        </tr>
                    </table>
                </Body>
            </ext:FormPanel>
        </ext:Anchor>
        <ext:Anchor Horizontal="95%">
            <ext:TextField runat="server" ID="txtRefuseReason" AllowBlank="true" FieldLabel="سبب الرفض" />
        </ext:Anchor>
        <ext:Anchor Horizontal="95%">
            <ext:FormPanel ID="FormPanel7" runat="server">
                <Body>
                    <table>
                        <tr>
                            <td>
                                <ext:Label runat="server" ID="lblBoardDateFrom" Text="تاريخ اللجنة من">
                                </ext:Label>
                            </td>
                            <td>
                                <ext:DateField runat="server" ID="dtBoardDateFrom" AllowBlank="true" FieldLabel="تاريخ اللجنة من" />
                            </td>
                            <td>
                                <ext:Label runat="server" ID="lblBoardDateTo" Text="إلى">
                                </ext:Label>
                            </td>
                            <td>
                                <ext:DateField runat="server" ID="dtBoardDateTo" AllowBlank="true" FieldLabel="الى" />
                            </td>
                        </tr>
                    </table>
                </Body>
            </ext:FormPanel>
        </ext:Anchor>
        <ext:Anchor Horizontal="95%">
            <ext:FormPanel ID="FormPanel8" runat="server">
                <Body>
                    <table>
                        <tr>
                            <td>
                                <ext:Label runat="server" ID="lblBoradNumberFrom" Text="رقم اللجنة من">
                                </ext:Label>
                            </td>
                            <td>
                                <ext:TextField runat="server" ID="txtBoradNumberFrom" AllowBlank="true" FieldLabel="رقم اللجنة من"
                                    Regex="^[0-9]+$" />
                            </td>
                            <td>
                                <ext:Label runat="server" ID="lblBoradNumberTo" Text="إلى">
                                </ext:Label>
                            </td>
                            <td>
                                <ext:TextField runat="server" ID="txtBoradNumberTo" AllowBlank="true" FieldLabel="إلى"
                                    Regex="^[0-9]+$" />
                            </td>
                        </tr>
                    </table>
                </Body>
            </ext:FormPanel>
        </ext:Anchor>
        <ext:Anchor Horizontal="95%">
            <ext:TextField runat="server" ID="txtBoardDecision" AllowBlank="true" FieldLabel="قرار اللجنة" />
        </ext:Anchor>
        <ext:Anchor Horizontal="95%">
            <ext:FormPanel ID="FormPanel15" runat="server">
                <Body>
                    <table>
                        <tr>
                            <td>
                                <ext:Label runat="server" ID="lblPostPoneReason" Text="سبب التأجيل">
                                </ext:Label>
                            </td>
                            <td>
                                <ext:TextField runat="server" ID="txtPostPoneReason" AllowBlank="true" FieldLabel="سبب التأجيل" />
                            </td>
                            <td>
                                <ext:Label runat="server" ID="lblResponsibles" Text="مسئول ميدانى">
                                </ext:Label>
                            </td>
                            <td>
                                <ext:ComboBox runat="server" StoreID="strResponsibles" ID="cmbResponsibles" DisplayField="DisplayName"
                                    ValueField="UserID" TypeAhead="true" Editable="true" FieldLabel="مسئول ميدانى"
                                    AllowBlank="true">
                                </ext:ComboBox>
                            </td>
                        </tr>
                    </table>
                </Body>
            </ext:FormPanel>
        </ext:Anchor>
    </ext:FormLayout>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="ReportBodyPlaceHolder" runat="server">
    <div class="r-container">
        <header>
            <div class="logo">
                <asp:Image ID="Image1" runat="server" ImageUrl="~/Assets/Images/PAPLogo.jpg" />
            </div>
            <div class="title">
                <%= this.Page.Title %>
            </div>
        </header>
        <div>
            <ext:DataView ID="DataView1" runat="server" StoreID="strReport" SingleSelect="true"
                ItemSelector="tr.row" EmptyText="<div class='x-r-emptyText'>No Data To Display</div>">
                <Template>
                    <html>
                        <table cellpadding="0" cellspacing="0" border="0">
                        <tr>
                            <th>
                                Loan Number
                            </th>
                            <th>
                                Customer Name
                            </th>
                            <th>
                                SSN
                            </th>
                            <th>
                                Loan Project
                            </th>
                            <th>
                                Loan Amount
                            </th>
                            <th>
                                Payment Period
                            </th>
                            <th>
                                Paid Amount
                            </th>
                            <th>
                                Required Amount
                            </th>
                            <th>
                                Payment Type
                            </th>
                        </tr>
                        <tpl for=".">
                            <tr>
                                <td>{LoanNumber}</td>
                                <td>{CustomerName}</td>
                                <td>{SSN}</td>
                                <td>{LoanName}</td>
                                <td>{LoanAmount}</td>
                                <td>{LoanPaymentPeriod}</td>
                                <td>{LoanPaidAmount}</td>
                                <td>{DueAmount}</td>
                                <td>{LoanPaymentMethodName}</td>
                            </tr>
                        </tpl>
                        </table>
                    </html>
                </Template>
            </ext:DataView>
        </div>
        <footer>
        </footer>
    </div>
</asp:Content>
